package sy.pageModel;

import java.util.LinkedHashMap;
import java.util.Map;

public class OrderStay {
	
	public final static String STAY_TYPE_RECUPERATE = "02";
	public final static String STAY_TYPE_APARTMENT = "04";
	public final static String STAY_TYPE_HOTEL = "03";
	
    public final static Map<String, String> STAY_TYPE_MAP = new LinkedHashMap<String, String>();
	
	static {
		STAY_TYPE_MAP.put(STAY_TYPE_RECUPERATE, "疗养院");
		STAY_TYPE_MAP.put(STAY_TYPE_APARTMENT, "老年公寓");
		STAY_TYPE_MAP.put(STAY_TYPE_HOTEL, "酒店");
	}
	
	private int page;
	private int rows;
	private String sort;
	private String order;
	private String ids;
	private String createTimeStart;
	private String createTimeEnd;
	
	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public int getRows() {
		return rows;
	}

	public void setRows(int rows) {
		this.rows = rows;
	}

	public String getSort() {
		return sort;
	}

	public void setSort(String sort) {
		this.sort = sort;
	}

	public String getOrder() {
		return order;
	}

	public void setOrder(String order) {
		this.order = order;
	}

	public String getIds() {
		return ids;
	}

	public void setIds(String ids) {
		this.ids = ids;
	}
	
	public String getCreateTimeStart() {
		return createTimeStart;
	}

	public void setCreateTimeStart(String createTimeStart) {
		this.createTimeStart = createTimeStart;
	}
	
	public String getCreateTimeEnd() {
		return createTimeEnd;
	}

	public void setCreateTimeEnd(String createTimeEnd) {
		this.createTimeEnd = createTimeEnd;
	}
	
	private String id = "";
	private String orderId = "";
	private String cardId = "";
	private String name = "";
	private String status = "";
	private String mobile = "";
	private String createTime = "";
	private String checkinTime = ""; //入住时间
	private String checkoutTime = ""; //退房时间
	private String cid = ""; //身份证号
	private String hotel = ""; //住宿单位名称
	private String hotelId = "";//住宿单位id
	private String roomName = ""; //房型名称
	private int roomCount; //房间数量
	private double roomFee;  //房间单价
	private double totalFee;    //总费用（单价X入住天数X房间单价）
	private double actualFee;   //实际费用
	private String serviceDetails = ""; //服务详单
	private String unit = ""; //计价单位
	private String stayType = ""; //住宿类型
	private int personCount; //所选房型可入住人数
	private String memberType = "";
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
	
	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}
	
	public String getCardId() {
		return cardId;
	}

	public void setCardId(String cardId) {
		this.cardId = cardId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public String getStatus() {
		return this.status;
	}
	
	public String getStatusName() {
		return OrderDoctor.ORDER_STATUS_MAP.get(status);
	}
	
	public void setStatus(String status) {
		this.status = status;
	}
	
	public String getMobile() {
		return mobile;
	}
	
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	
	public String getCreateTime() {
		return createTime;
	}
	
	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}
	
	public String getCheckinTime() {
		return checkinTime;
	}
	
	public void setCheckinTime(String checkinTime) {
		this.checkinTime = checkinTime;
	}
	
	public String getCheckoutTime() {
		return checkoutTime;
	}
	
	public void setCheckoutTime(String checkoutTime) {
		this.checkoutTime = checkoutTime;
	}
	
	public String getCid() {
		return cid;
	}
	
	public void setCid(String cid) {
		this.cid = cid;
	}
	
	public String getHotel() {
		return hotel;
	}
	
	public void setHotel(String hotel) {
		this.hotel = hotel;
	}
	
	public String getHotelId() {
		return hotelId;
	}
	
	public void setHotelId(String hotelId) {
		this.hotelId = hotelId;
	}
	
	public String getRoomName() {
		return roomName;
	}
	
	public void setRoomName(String roomName) {
		this.roomName = roomName;
	}
	
	public int getRoomCount() {
		return roomCount;
	}
	
	public void setRoomCount(int roomCount) {
		this.roomCount = roomCount;
	}
	
	public double getRoomFee() {
		return roomFee;
	}
	
	public void setRoomFee(double roomFee) {
		this.roomFee = roomFee;
	}
	
	public double getTotalFee() {
		return totalFee;
	}
	
	public void setTotalFee(double totalFee) {
		this.totalFee = totalFee;
	}
	
	public double getActualFee() {
		return actualFee;
	}
	
	public void setActualFee(double actualFee) {
		this.actualFee = actualFee;
	}
	
	public String getServiceDetails() {
		return serviceDetails;
	}
	
	public void setServiceDetails(String serviceDetails) {
		this.serviceDetails = serviceDetails;
	}
	
	public String getUnit() {
		return unit;
	}
	
	public void setUnit(String unit) {
		this.unit = unit;
	}
	
	public String getStayType() {
		return stayType;
	}
	
	public void setStayType(String stayType) {
		this.stayType = stayType;
	}
	
	public int getPersonCount() {
		return personCount;
	}
	
	public void setPersonCount(int personCount) {
		this.personCount = personCount;
	}
	
	public String getStayTypeName() {
		return STAY_TYPE_MAP.get(this.stayType);
	}
	
	public String getMemberType() {
		return this.memberType;
	}
	
	public String getMemberTypeName() {
		return Member.MEMBER_TYPE_MAP.get(memberType);
	}
	
	public void setMemberType(String memberType) {
		this.memberType = memberType;
	}
	
	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("id='" + id + "', ");
		sb.append("cardId='" + cardId + "', ");
	    sb.append("name='" + name + "', ");
	    sb.append("status='" + status + "', ");
	    sb.append("statusName='" + this.getStatusName() + "', ");
	    sb.append("mobile='" + mobile + "', ");
	    sb.append("orderId='" + orderId + "', ");
	    sb.append("createTime='" + createTime + "', ");
	    sb.append("checkinTime='" + checkinTime + "', ");
	    sb.append("checkoutTime='" + checkoutTime + "', ");
	    sb.append("cid='" + cid + "', ");
	    sb.append("hotel='" + hotel + "', ");
	    sb.append("roomName='" + roomName + "', ");
	    sb.append("roomCount='" + roomCount + "', ");
	    sb.append("roomFee='" + roomFee + "', ");
	    sb.append("totalFee='" + totalFee + "', ");
	    sb.append("actualFee='" + actualFee + "', ");
	    sb.append("serviceDetails='" + serviceDetails + "', ");
	    sb.append("unit='" + unit + "', ");
	    sb.append("stayType='" + stayType + "', ");
	    sb.append("personCount='" + personCount + "', ");
	    sb.append("stayTypeName='" + this.getStayTypeName() + "', ");
	    sb.append("hotelId='" + this.getHotelId() + "'");
	    return sb.toString();		
	}
}
